package com.bmslz.monitor.base.dto;

import com.bmslz.monitor.base.util.StringUtils;
import com.bmslz.monitor.base.config.excep.MyException;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @Description: 登录入参
 * @Author: bobo
 * @Date: 2025-08-23
 * @Version: V1.0
 */
@Data
public class LoginDto {
    @ApiModelProperty(value = "用户名")
    private String userName;//用户名
    @ApiModelProperty(value = "密码")
    private String password;//密码

    public void check() {
        if (StringUtils.isEmpty(userName)) {
            throw new MyException(500, "用户名不能为空");
        }
        if (StringUtils.isEmpty(password)) {
            throw new MyException(500, "密码不能为空");
        }
    }
}
